-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(blood): Added faker for blood types #40
feat(blood): Added faker for blood types #40
Conversation
Added faker that will generate blood type, rh factor and group Signed-off-by: Rubem Mota <rubemmota89@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add this support to the main tag? on faker.go?
Somewhere in this lines
Lines 134 to 234 in 29e74ae
func initDefaultTag() { | |
defaultTag.Store(EmailTag, EmailTag) | |
defaultTag.Store(MacAddressTag, MacAddressTag) | |
defaultTag.Store(DomainNameTag, DomainNameTag) | |
defaultTag.Store(URLTag, URLTag) | |
defaultTag.Store(UserNameTag, UserNameTag) | |
defaultTag.Store(IPV4Tag, IPV4Tag) | |
defaultTag.Store(IPV6Tag, IPV6Tag) | |
defaultTag.Store(PASSWORD, PASSWORD) | |
defaultTag.Store(JWT, JWT) | |
defaultTag.Store(CreditCardType, CreditCardType) | |
defaultTag.Store(CreditCardNumber, CreditCardNumber) | |
defaultTag.Store(LATITUDE, LATITUDE) | |
defaultTag.Store(LONGITUDE, LONGITUDE) | |
defaultTag.Store(RealAddressTag, RealAddressTag) | |
defaultTag.Store(PhoneNumber, PhoneNumber) | |
defaultTag.Store(TollFreeNumber, TollFreeNumber) | |
defaultTag.Store(E164PhoneNumberTag, E164PhoneNumberTag) | |
defaultTag.Store(TitleMaleTag, TitleMaleTag) | |
defaultTag.Store(TitleFemaleTag, TitleFemaleTag) | |
defaultTag.Store(FirstNameTag, FirstNameTag) | |
defaultTag.Store(FirstNameMaleTag, FirstNameMaleTag) | |
defaultTag.Store(FirstNameFemaleTag, FirstNameFemaleTag) | |
defaultTag.Store(LastNameTag, LastNameTag) | |
defaultTag.Store(NAME, NAME) | |
defaultTag.Store(ChineseFirstNameTag, ChineseFirstNameTag) | |
defaultTag.Store(ChineseLastNameTag, ChineseLastNameTag) | |
defaultTag.Store(ChineseNameTag, ChineseNameTag) | |
defaultTag.Store(GENDER, GENDER) | |
defaultTag.Store(UnixTimeTag, UnixTimeTag) | |
defaultTag.Store(DATE, DATE) | |
defaultTag.Store(TIME, TimeFormat) | |
defaultTag.Store(MonthNameTag, MonthNameTag) | |
defaultTag.Store(YEAR, YearFormat) | |
defaultTag.Store(DayOfWeekTag, DayOfWeekTag) | |
defaultTag.Store(DayOfMonthTag, DayOfMonthFormat) | |
defaultTag.Store(TIMESTAMP, TIMESTAMP) | |
defaultTag.Store(CENTURY, CENTURY) | |
defaultTag.Store(TIMEZONE, TIMEZONE) | |
defaultTag.Store(TimePeriodTag, TimePeriodFormat) | |
defaultTag.Store(WORD, WORD) | |
defaultTag.Store(SENTENCE, SENTENCE) | |
defaultTag.Store(PARAGRAPH, PARAGRAPH) | |
defaultTag.Store(CurrencyTag, CurrencyTag) | |
defaultTag.Store(AmountTag, AmountTag) | |
defaultTag.Store(AmountWithCurrencyTag, AmountWithCurrencyTag) | |
defaultTag.Store(ID, ID) | |
defaultTag.Store(HyphenatedID, HyphenatedID) | |
defaultTag.Store(RussianFirstNameMaleTag, RussianFirstNameMaleTag) | |
defaultTag.Store(RussianLastNameMaleTag, RussianLastNameMaleTag) | |
defaultTag.Store(RussianFirstNameFemaleTag, RussianFirstNameFemaleTag) | |
defaultTag.Store(RussianLastNameFemaleTag, RussianLastNameFemaleTag) | |
} | |
var mapperTag = mapperTagCustom{} | |
func initMappertTagDefault() { | |
mapperTag.Store(CreditCardType, GetPayment().CreditCardType) | |
mapperTag.Store(CreditCardNumber, GetPayment().CreditCardNumber) | |
mapperTag.Store(LATITUDE, GetAddress().Latitude) | |
mapperTag.Store(LONGITUDE, GetAddress().Longitude) | |
mapperTag.Store(RealAddressTag, GetAddress().RealWorld) | |
mapperTag.Store(PhoneNumber, GetPhoner().PhoneNumber) | |
mapperTag.Store(TollFreeNumber, GetPhoner().TollFreePhoneNumber) | |
mapperTag.Store(E164PhoneNumberTag, GetPhoner().E164PhoneNumber) | |
mapperTag.Store(TitleMaleTag, GetPerson().TitleMale) | |
mapperTag.Store(TitleFemaleTag, GetPerson().TitleFeMale) | |
mapperTag.Store(FirstNameTag, GetPerson().FirstName) | |
mapperTag.Store(FirstNameMaleTag, GetPerson().FirstNameMale) | |
mapperTag.Store(FirstNameFemaleTag, GetPerson().FirstNameFemale) | |
mapperTag.Store(LastNameTag, GetPerson().LastName) | |
mapperTag.Store(NAME, GetPerson().Name) | |
mapperTag.Store(ChineseFirstNameTag, GetPerson().ChineseFirstName) | |
mapperTag.Store(ChineseLastNameTag, GetPerson().ChineseLastName) | |
mapperTag.Store(ChineseNameTag, GetPerson().ChineseName) | |
mapperTag.Store(GENDER, GetPerson().Gender) | |
mapperTag.Store(UnixTimeTag, GetDateTimer().UnixTime) | |
mapperTag.Store(DATE, GetDateTimer().Date) | |
mapperTag.Store(TIME, GetDateTimer().Time) | |
mapperTag.Store(MonthNameTag, GetDateTimer().MonthName) | |
mapperTag.Store(YEAR, GetDateTimer().Year) | |
mapperTag.Store(DayOfWeekTag, GetDateTimer().DayOfWeek) | |
mapperTag.Store(DayOfMonthTag, GetDateTimer().DayOfMonth) | |
mapperTag.Store(TIMESTAMP, GetDateTimer().Timestamp) | |
mapperTag.Store(CENTURY, GetDateTimer().Century) | |
mapperTag.Store(TIMEZONE, GetDateTimer().TimeZone) | |
mapperTag.Store(TimePeriodTag, GetDateTimer().TimePeriod) | |
mapperTag.Store(WORD, GetLorem().Word) | |
mapperTag.Store(SENTENCE, GetLorem().Sentence) | |
mapperTag.Store(PARAGRAPH, GetLorem().Paragraph) | |
mapperTag.Store(CurrencyTag, GetPrice().Currency) | |
mapperTag.Store(AmountTag, GetPrice().Amount) | |
mapperTag.Store(AmountWithCurrencyTag, GetPrice().AmountWithCurrency) | |
mapperTag.Store(ID, GetIdentifier().Digit) | |
mapperTag.Store(HyphenatedID, GetIdentifier().Hyphenated) | |
mapperTag.Store(RussianFirstNameMaleTag, GetPerson().RussianFirstNameMale) | |
mapperTag.Store(RussianFirstNameFemaleTag, GetPerson().RussianFirstNameFemale) | |
mapperTag.Store(RussianLastNameMaleTag, GetPerson().RussianLastNameMale) | |
mapperTag.Store(RussianLastNameFemaleTag, GetPerson().RussianLastNameFemale) | |
} | |
Signed-off-by: Rubem <rubemmota89@gmail.com>
Signed-off-by: Rubem <rubemmota89@gmail.com>
Thank you for your suggestion. I've made that change. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
==========================================
- Coverage 89.16% 89.01% -0.15%
==========================================
Files 12 13 +1
Lines 1781 1812 +31
==========================================
+ Hits 1588 1613 +25
- Misses 138 142 +4
- Partials 55 57 +2 ☔ View full report in Codecov by Sentry. |
Added faker that will generate blood type, rh factor and group